/**
	ETFRoot project, Anyang Normal University && IMP-CAS
	\class ETFUserVMERawEvent
	\brief class to hold the raw data of a VME event, keeping its original data
	arrangement as in the VME crate
	\author SUN Yazhou, asia.rabbit
	\since 2022-04-27
	\date 2022-04-27
	\attention
	changelog
	<table>
	<tr>  <th>Date         <th>Author      <th>Description                   </tr>
	<tr>  <td>2022-04-27   <td>Asia Sun    <td>file created                  </tr>
	</table>

	\copyright Copyright (c) 2022 Anyang Normal U. && IMP-CAS with LGPLv3 LICENSE
*/

#ifndef ETFUserVMERawEvent_h
#define ETFUserVMERawEvent_h

#include "ETFVMERawEvent.h"

class ETFUserVMERawEvent : public ETFVMERawEvent{
public:
	ETFUserVMERawEvent();
	ETFUserVMERawEvent(const ETFUserVMERawEvent &evt);
	virtual ~ETFUserVMERawEvent();

	virtual void Reset();
	virtual void Initialize(){ Reset(); }

	virtual double dE0() const{ return double(fadc[16] + fadc[17]) / 2000.; }
	virtual double dE1() const{ return double(fadc[22] + fadc[23] + fadc[24]) / 3000.; }
	virtual int &adc(int i, int j = 0);
	virtual int &qdc(int i, int j = 0);
	virtual void Print() const;

	ClassDef(ETFUserVMERawEvent, 1); ///< original VME daq data format

protected:
	int fadc[32]; //!< MUlti-Sampling Ionization Chamber (music) data
	int fqdc[3][32]; //!< 3 modules * 32 channels
};

#endif
